package com.xialing.weblog.admin.runner;

import com.xialing.weblog.admin.service.AdminStatisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
import org.springframework.stereotype.Component;


@Component
@Slf4j
public class StatisticsCategoryArticleTotalRunner implements CommandLineRunner {

    @Autowired
    private AdminStatisticsService adminStatisticsService;

    @Override
    public void run(String... args) throws Exception {
        log.info("==> 统计分类文章总数...");
        adminStatisticsService.statisticsCategoryArticleTotal();
        log.info("==> 统计分类文章总数完成...");
    }
}
